1. Field of the Invention
The present invention relates to a technique for selecting the gain of a circuit.
2. Description of the Prior Art
Integrated circuits (ICs) often include circuitry that allow for adjustment of the gain of one or more stages. For example, a CODEC (coder-decoder) of the type used in telephones may provide for gain adjustment. Typically, the gain of an amplifier that receives an analog signal from the microphone and provides it to an analog-to-digital (AID) converter (the "encoder") may be adjusted. Furthermore, the gain of another amplifier that receives the output from a digital-to-analog (D/A) converter (the "decoder") and supplies it to a speaker may be adjusted. In many cases, a wide range of gains are possible by the appropriate choice of resistor values. For example, the gain may be determined by the value of a feedback resistor relative to an input resistor of an operational amplifier. However, implementing the capability to easily choose resistor values may require that integrated circuit package terminals be devoted to connection to one or more external resistors if the user of the IC is to be allowed the choice of gain values. The number of terminals that is required is increased if several CODECs are formed on a single integrated circuit. Alternatively, the gain may be pre-set during the fabrication of the integrated circuit, as by a metal mask option or blowing of fuses to set the values of resistors required. This reduces or eliminates the number of package terminals required for connection to external resistors, but limits the flexibility of use of the IC after it is manufactured, since the user may not be able to change gain values of the internal circuitry.
A wide range of gain values (e.g., 0 to 23 dB) may be accommodated by the choice of resistor values, whether the resistors are selected off-chip or on-chip as noted above. Programmable CODECs use a register to allow setting the gain in steps (e.g., 0.1 dB). However, programmable CODECs use a serial interface that requires a number of IC package pins (e.g., data, clock, and read/write), and a number of control pins. They typically also require random access memory and decoding logic. However, in practice, a given user may need to change between only a relatively small number of gain values in actual operation of a device. For example, CODECs used in telephone sets usually provide a "mute" or "conference mode" capability to reduce the gain of the handset speaker amplifier and microphone amplifier, so that a phone conversation may be temporarily interrupted without hanging up the phone. In that case, only two gain values are under the control of the telephone user by means of a pushbutton. However, different manufacturers of telephone sets may wish to choose different values of these two different gains, as for compensating for the differing sensitivities of other circuit components, for example. Therefore, it is desirable to provide a choice of gain values using a minimal number of integrated circuit package terminals while still allowing for the choice of a range of gain values.